/*
 * @(#)MessageTag.java
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */
package com.dcivision.framework.taglib.bean;

import javax.servlet.jsp.JspException;

/**
  MessageTag.java

  <p>This class is to extend the MessageTag provided by Apache Struts.<p>
  <p>Modification in "struts-bean.tld"<br>
  <pre>
     [FROM]
     &lt;tagclass&gt;org.apache.struts.taglib.bean.MessageTag&lt;/tagclass&gt;
     [TO]
     &lt;tagclass&gt;com.dcivision.framework.taglib.bean.MessageTag&lt;/tagclass&gt;

     [ADDED]
     &lt;attribute&gt;
     &lt;name&gt;replace&lt;/name&gt;
     &lt;required&gt;false&lt;/required&gt;
     &lt;rtexprvalue&gt;true&lt;/rtexprvalue&gt;
     &lt;/attribute&gt;
     &lt;attribute&gt;
     &lt;name&gt;escape&lt;/name&gt;
     &lt;required&gt;false&lt;/required&gt;
     &lt;rtexprvalue&gt;true&lt;/rtexprvalue&gt;
     &lt;/attribute&gt;
  </pre>
  </p>

    @author          Rollo Chan
    @company         DCIVision Limited
    @creation date   04/07/2003
    @version         $Revision: 1.4 $
*/

public class MessageTag extends org.apache.struts.taglib.bean.MessageTag {

  public static final String REVISION = "$Revision: 1.4 $";

  public int doStartTag() throws JspException {
    if (this.key != null && this.key.startsWith("customize")) {
      this.setBundle("customize");
    } else {
      this.setBundle(null);
    }
    return(super.doStartTag());
  }
}
